package com.hmall.util;

import com.hmall.model.MallHotVo;
import com.hmall.model.MallProduct;

import java.math.BigDecimal;

public class CastHotUtil {

    public static  MallHotVo hotCast(MallProduct mallProduct, BigDecimal salesVolume){

        MallHotVo mallHotVo = new MallHotVo();
        mallHotVo.setSales_volume(salesVolume);
        mallHotVo.setCategoryId(mallProduct.getCategoryId());
        mallHotVo.setCommentNum(mallProduct.getCommentNum());
        mallHotVo.setContent(mallProduct.getContent());
        mallHotVo.setCreateTime(mallProduct.getCreateTime());
        mallHotVo.setDetail(mallProduct.getDetail());
        mallHotVo.setId(mallProduct.getId());
        mallHotVo.setIsnew(mallProduct.getIsnew());
        mallHotVo.setMainImage(mallProduct.getMainImage());
        mallHotVo.setName(mallProduct.getName());
        mallHotVo.setPrice(mallProduct.getPrice());
        mallHotVo.setProductno(mallProduct.getProductno());
        mallHotVo.setSearchHot(mallProduct.getSearchHot());
        mallHotVo.setSpecial(mallProduct.getSpecial());
        mallHotVo.setStatus(mallProduct.getStatus());
        mallHotVo.setSubImages(mallProduct.getSubImages());
        mallHotVo.setSubtitle(mallProduct.getSubtitle());
        mallHotVo.setShopid(mallProduct.getShopid());
        mallHotVo.setStock(mallProduct.getStock());
        mallHotVo.setUpdateTime(mallProduct.getUpdateTime());
        mallHotVo.setUprice(mallProduct.getUprice());
        return mallHotVo;
    }
}
